import request from '@/utils/request'

// 查询明信片列表
export function listPostcard(query) {
  return request({
    url: '/index/postcard/list',
    method: 'get',
    params: query
  })
}

// 查询明信片详细
export function getPostcard(id) {
  return request({
    url: '/index/postcard/' + id,
    method: 'get'
  })
}

// 新增明信片
export function addPostcard(data) {
  return request({
    url: '/index/postcard',
    method: 'post',
    data: data
  })
}

// 修改明信片
export function updatePostcard(data) {
  return request({
    url: '/index/postcard',
    method: 'put',
    data: data
  })
}

// 删除明信片
export function delPostcard(id) {
  return request({
    url: '/index/postcard/' + id,
    method: 'delete'
  })
}
